import random
import string
with open('big.txt','w+',encoding = "utf-8") as f:
    line = random.randint(1,100)
    for j in range(line):
        f.write(("".join(random.choices(string.ascii_lowercase,k = random.randint(1,50)))+"\n"))

def readfile():
    with open('big.txt','r') as f:
        list = f.readlines()
        length = [ len(i) for i in list]
        yield max(length)

b = readfile()
print(next(b))
